#include "StdAfx.h"
#include "Player.h"
#include <stdio.h>

Player::Player()
{
}
Player::~Player(void)
{
}

void Player::Position(COORD coord, char Char)
{
	Pos = coord;
	Move();
}

void Player::Position(char Char, SHORT x=0, SHORT y=0)
{
	Pos.X = x;
	Pos.Y = y;
	Move();
}

void Player::OnKeyDown( UINT nChar, UINT nRepCnt, UINT nFlags )
{
	switch (nChar)
	{
		case VK_LEFT:
				Pos.X = Pos.X - 5;
				break;
		case VK_RIGHT:
				Pos.X = Pos.X + 5;
				break;
		case VK_UP:
				Pos.Y = Pos.Y + 5;
				break;
		case VK_DOWN:
				Pos.Y = Pos.Y - 5;
				break;

		default:
			break;
	}
}

void Player::OnLButtonDown(UINT nFlags, COORD Mpoint)
{
	Pos.X = Mpoint.X ;
	Pos.Y =	Mpoint.Y ;
}

int Player::render(long time)
{

}
